package com.dailyblue.java.standard.thread.pool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPoolDemoB {
    public static void main(String[] args) {
        // 创建了一个定长(4)线程池
        ExecutorService service = Executors.newFixedThreadPool(4);
        for (int i = 0; i < 100; i++) {
            Task task = new Task(i);
            service.execute(task);
        }
    }
}
